<?php

namespace BP\CompteBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * BP\CompteBundle\Entity\Operation
 *
 * @ORM\Table()
 * @ORM\Entity(repositoryClass="BP\CompteBundle\Entity\OperationRepository")
 */
class Operation
{

    public function __construct() {
	$this->created_at = new \DateTime('now');
	$this->updated_at = new \DateTime('now');
	$this->deleted = 0;
	$this->category_id = 1;
	$this->type = 1;
    }

    /**
     * @var integer $id
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

	/**
	 * @ORM\ManyToOne(targetEntity="BP\CompteBundle\Entity\Compte", inversedBy="operations")
     */
	protected $compte;

    /**
     * @var integer $valeur
     *
     * @ORM\Column(name="valeur", type="integer")
     */
    private $valeur;

	/**
     * @var string $category_id
     *
     * @ORM\Column(name="category_id", type="integer")
     */
	private $category_id="1";
	
    /**
     * @var string $description
     *
     * @ORM\Column(name="description", type="string", length=255)
     */
    private $description;

    /**
     * @var boolean $type
     *
     * @ORM\Column(name="type", type="boolean")
     */
    private $type;

    /**
     * @var datetime $created_at
     *
     * @ORM\Column(name="created_at", type="datetime")
     */
    private $created_at;

    /**
     * @var datetime $updated_at
     *
     * @ORM\Column(name="updated_at", type="datetime")
     */
    private $updated_at;
    
    /**
     * @var boolean $deleted
     *
     * @ORM\Column(name="deleted", type="boolean")
     */
    private $deleted = "0";
    
    /**
     * @var string $label
     *
     * @ORM\Column(name="label", type="string", length=255)
     */
    private $label;


    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set compte_id
     *
     * @param integer $compteId
     */
    public function setCompteId($compteId)
    {
        $this->compte_id = $compteId;
    }

    /**
     * Get compte_id
     *
     * @return integer 
     */
    public function getCompteId()
    {
        return $this->compte_id;
    }

    /**
     * Set valeur
     *
     * @param integer $valeur
     */
    public function setValeur($valeur)
    {
        $this->valeur = $valeur;
    }

    /**
     * Get valeur
     *
     * @return integer 
     */
    public function getValeur()
    {
        return $this->valeur;
    }

    /**
     * Set description
     *
     * @param string $description
     */
    public function setDescription($description)
    {
        $this->description = $description;
    }

    /**
     * Get description
     *
     * @return string 
     */
    public function getDescription()
    {
        return $this->description;
    }

    /**
     * Set type
     *
     * @param boolean $type
     */
    public function setType($type)
    {
        $this->type = $type;
    }

    /**
     * Get type
     *
     * @return boolean 
     */
    public function getType()
    {
        return $this->type;
    }

    /**
     * Set created_at
     *
     * @param datetime $createdAt
     */
    public function setCreatedAt($createdAt)
    {
        $this->created_at = $createdAt;
    }

    /**
     * Get created_at
     *
     * @return datetime 
     */
    public function getCreatedAt()
    {
        return $this->created_at;
    }

    /**
     * Set updated_at
     *
     * @param datetime $updatedAt
     */
    public function setUpdatedAt($updatedAt)
    {
        $this->updated_at = $updatedAt;
    }

    /**
     * Get updated_at
     *
     * @return datetime 
     */
    public function getUpdatedAt()
    {
        return $this->updated_at;
    }

    /**
     * Set deleted
     *
     * @param boolean $deleted
     */
    public function setDeleted($deleted)
    {
        $this->deleted = $deleted;
    }

    /**
     * Get deleted
     *
     * @return boolean 
     */
    public function getDeleted()
    {
        return $this->deleted;
    }

    /**
     * Set label
     *
     * @param string $label
     */
    public function setLabel($label)
    {
        $this->label = $label;
    }

    /**
     * Get label
     *
     * @return string 
     */
    public function getLabel()
    {
        return $this->label;
    }

    /**
     * Set category_id
     *
     * @param integer $categoryId
     */
    public function setCategoryId($categoryId)
    {
        $this->category_id = $categoryId;
    }

    /**
     * Get category_id
     *
     * @return integer 
     */
    public function getCategoryId()
    {
        return $this->category_id;
    }

    /**
     * Set compte
     *
     * @param BP\CompteBundle\Entity\Compte $compte
     */
    public function setCompte(\BP\CompteBundle\Entity\Compte $compte)
    {
        $this->compte = $compte;
    }

    /**
     * Get compte
     *
     * @return BP\CompteBundle\Entity\Compte 
     */
    public function getCompte()
    {
        return $this->compte;
    }
}